<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="discoveryengine_v1beta.html">Discovery Engine API</a> . <a href="discoveryengine_v1beta.projects.html">projects</a> . <a href="discoveryengine_v1beta.projects.locations.html">locations</a> . <a href="discoveryengine_v1beta.projects.locations.groundingConfigs.html">groundingConfigs</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#check">check(groundingConfig, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Performs a grounding check.</p>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="check">check(groundingConfig, body=None, x__xgafv=None)</code>
  <pre>Performs a grounding check.

Args:
  groundingConfig: string, Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for GroundedGenerationService.CheckGrounding method.
  &quot;answerCandidate&quot;: &quot;A String&quot;, # Answer candidate to check. It can have a maximum length of 4096 tokens.
  &quot;facts&quot;: [ # List of facts for the grounding check. We support up to 200 facts.
    { # Grounding Fact.
      &quot;attributes&quot;: { # Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;factText&quot;: &quot;A String&quot;, # Text content of the fact. Can be at most 10K characters long.
    },
  ],
  &quot;groundingSpec&quot;: { # Specification for the grounding check. # Configuration of the grounding check.
    &quot;citationThreshold&quot;: 3.14, # The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.
    &quot;enableClaimLevelScore&quot;: True or False, # The control flag that enables claim-level grounding score in the response.
  },
  &quot;userLabels&quot;: { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
    &quot;a_key&quot;: &quot;A String&quot;,
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the GroundedGenerationService.CheckGrounding method.
  &quot;citedChunks&quot;: [ # List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
    { # Fact Chunk.
      &quot;chunkText&quot;: &quot;A String&quot;, # Text content of the fact chunk. Can be at most 10K characters long.
      &quot;domain&quot;: &quot;A String&quot;, # The domain of the source.
      &quot;index&quot;: 42, # The index of this chunk. Currently, only used for the streaming mode.
      &quot;source&quot;: &quot;A String&quot;, # Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.
      &quot;sourceMetadata&quot;: { # More fine-grained information for the source reference.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;title&quot;: &quot;A String&quot;, # The title of the source.
      &quot;uri&quot;: &quot;A String&quot;, # The URI of the source.
    },
  ],
  &quot;citedFacts&quot;: [ # List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
    { # Fact chunk for grounding check.
      &quot;chunkText&quot;: &quot;A String&quot;, # Text content of the fact chunk. Can be at most 10K characters long.
    },
  ],
  &quot;claims&quot;: [ # Claim texts and citation info across all claims in the answer candidate.
    { # Text and citation info for a claim in the answer candidate.
      &quot;citationIndices&quot;: [ # A list of indices (into &#x27;cited_chunks&#x27;) specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.
        42,
      ],
      &quot;claimText&quot;: &quot;A String&quot;, # Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.
      &quot;endPos&quot;: 42, # Position indicating the end of the claim in the answer candidate, exclusive, in bytes. Note that this is not measured in characters and, therefore, must be rendered as such. For example, if the claim text contains non-ASCII characters, the start and end positions vary when measured in characters (programming-language-dependent) and when measured in bytes (programming-language-independent).
      &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim doesn&#x27;t require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices should not be returned.
      &quot;score&quot;: 3.14, # Confidence score for the claim in the answer candidate, in the range of [0, 1]. This is set only when `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
      &quot;startPos&quot;: 42, # Position indicating the start of the claim in the answer candidate, measured in bytes. Note that this is not measured in characters and, therefore, must be rendered in the user interface keeping in mind that some characters may take more than one byte. For example, if the claim text contains non-ASCII characters, the start and end positions vary when measured in characters (programming-language-dependent) and when measured in bytes (programming-language-independent).
    },
  ],
  &quot;supportScore&quot;: 3.14, # The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.
}</pre>
</div>

<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

</body></html>